-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce duplicate code across different curve cycle providers #255
Conversation
321bc70
to
6f9990e
Compare
Does it actually close the issue? There is still impl_traits that is duplicated between mod.rs and pasta.rs, right? |
I don't fully understand this question. Can you please elaborate? |
Exactly.
Sorry for confusing. It seems we can't save the number of constraints, because the Weierstrass affine coordinate still needs condition branch. |
* Small code improvement to the minroot example (microsoft#264) about 10% improvement for the non-release mode * Reduce duplicate code across different curve cycle providers (microsoft#255) * refactor: impl folding macro * refactor: generalize curve test * chore: rename impl_folding to impl_engine * reorganize provider module (microsoft#267) --------- Co-authored-by: field-worker <[email protected]> Co-authored-by: ashWhiteHat <[email protected]> Co-authored-by: Srinath Setty <[email protected]>
I reduced test and transcript trait code across curve cycle by macros.
improvement
curve cycle group methods difference is only vartime_multiscalar_mul.
https://github.com/microsoft/Nova/blob/main/src/provider/mod.rs#L159
If we call msm method through such that
Self::msm()
, we can use same trait between pasta and other cycle pair.question
Is there any reason not to use complete addition for
ecc
gadget?https://github.com/microsoft/Nova/blob/main/src/gadgets/ecc.rs#L135
We can skip condition branch constraint.
typo
the
duplicationhttps://eprint.iacr.org/2023/1192.pdf#page=4&zoom=100,100,250
I would appreciate it if you could confirm.
Thank you.